// ? 系统全局字典

import { ColumnProps } from '~/library/components/ProTable/interface'
import { getProcureWarehouseTotalAPI } from '../api/procure'
import {
  goodsTotalColumns,
  procureTypeTotalColumns,
  rejectionTotalColumns,
  supplierGoodsTotalColumns,
  supplierTotalColumns,
  supplierTypeTotalColumns,
  warehouseTotalColumns,
} from '../views/procure/procureTotal/columns'

/**
 * @description：用户性别
 */
export const genderType = [
  { label: '男', value: 1 },
  { label: '女', value: 2 },
  { label: '未知', value: 3 },
]

/**
 * @description：用户状态
 */
export const userStatus = [
  { label: '启用', value: 1 },
  { label: '禁用', value: 0 },
]

/**
 * @description：状态(通用)
 */
export const generalStatus = [
  { label: '启用', value: 1 },
  { label: '禁用', value: 2 },
]
export const generalStatus2 = [
  { label: '启用', value: true },
  { label: '禁用', value: false },
]

/**
 * @description：会员状态
 */
export const memberStatus = [
  { label: '启用', value: 1 },
  { label: '禁用', value: 2 },
]

/**
 * @description：会员等级
 */
export const memberGrade = [
  { label: '超级vip', value: 1 },
  { label: '积分卡会员', value: 2 },
  { label: '七折会员', value: 3 },
  { label: '八折会员', value: 4 },
  { label: '储值会员', value: 5 },
]

/**
 * @description：促销类型
 */
export const promotionType = [
  { label: '全部', value: 0 },
  { label: '单品特价', value: 1 },
  { label: '直接折扣', value: 2 },
  { label: '第二件折扣', value: 3 },
  { label: '满额返现', value: 4 },
  { label: '换购促销', value: 5 },
]

// @description：促销方案状态
export const schemeStatus = [
  { label: '全部', value: -1 },
  { label: '未审核', value: 0 },
  { label: '已审核', value: 1 },
  { label: '停用', value: 2 },
]
// @description：促销模式
export const promotionMode = [
  { label: '特价', value: 1 },
  { label: '折扣', value: 2 },
  { label: '买一送一', value: 3 },
  { label: '第二份半价', value: 4 },
]

// @description：促销人群
export const promotionalAudience = [
  { label: '全部', value: 0 },
  { label: '非会员', value: 1 },
  { label: '会员', value: 2 },
]

/**
 * @description：会员等级默认状态
 */
export const memberGradeDefault = [
  { label: '开启', value: true },
  { label: '关闭', value: false },
]

/**
 * @description：会员等级自动升级
 */
export const memberGradeUpgrade = [
  { label: '开启', value: true },
  { label: '关闭', value: false },
]

/**
 * @description：菜品状态
 */
export const goodsStatus = [
  { label: '全部', value: 0 },
  { label: '在售', value: 1 },
  { label: '停手', value: 2 },
  { label: '尚未启售', value: 3 },
]

/**
 * @description：备注类型
 */
export const commentType = [
  { label: '改价原因', value: 1 },
  { label: '反结账原因', value: 2 },
  { label: '退菜原因', value: 3 },
  { label: '开台备注', value: 4 },
  { label: '菜品备注', value: 5 },
]
/**
 * @description：调整原因类型
 */
export const adjustmentType = [
  { label: '调整', value: 1 },
  { label: '报损', value: 2 },
  { label: '退货', value: 3 },
]
/**
 * @description：调整单据状态类型
 */
export const adjustmentOrderType = [
  { label: '制单中', value: 1 },
  { label: '已审核', value: 2 },
]

export const stockFlagType = [
  { label: '入库', value: 1 },
  { label: '出库', value: 2 },
]
//  账户类型
export const accountType = [
  { label: '管理员', value: 0 },
  { label: '员工', value: 1 },
  { label: '收营员', value: 2 },
]

export const accountStatus = [
  { label: '正常', value: 0 },
  { label: '冻结', value: 1 },
  { label: '审核中', value: 2 },
]
// 采购单收货状态
export const deliveryStatus = [
  { label: '待收货', value: 1 },
  { label: '部分收货', value: 2 },
  { label: '收货完成', value: 3 },
  { label: '收货关闭', value: 4 },
]
// 采购单审核状态
export const checkFlag = [
  { label: '未审核', value: false },
  { label: '已审核', value: true },
]
// 装修轮播图片链接类型
export const rotationType = [
  { label: 'URL链接', value: 1 },
  { label: '商品', value: 2 },
  { label: '文章', value: 3 },
]
export const swiperType = [
  { label: '普通展示图片', value: 0 },
  { label: '菜品URL链接', value: 1 },
  // { label: "商品", value: 2 },
  // { label: "文章", value: 3 }
]
// 单据类型
export const orderType = [
  { label: '入库单', value: 1 },
  { label: '退货单', value: 2 },
]

// 入库单状态
export const stockingStatus = [
  { label: '待收货', value: 1 },
  { label: '已收货', value: 2 },
]
// 单据日期类型
export const timeType = [
  { label: '订单日期', value: 0 },
  { label: '期望到货日期', value: 1 },
  { label: '创建时间', value: 2 },
]
// 单据日期类型
export const returnType = [
  { label: '损坏退货', value: 1 },
  { label: '错发退货', value: 2 },
  { label: '多发退货', value: 3 },
  { label: '库存积压退货', value: 4 },
  { label: '其他退货', value: 5 },
]

//  出库单类型
export const outType = [
  { label: '其他出库', value: 1 },
  { label: '销售出库', value: 2 },
  { label: '销售退货', value: 3 },
]

// 定时任务完成状态
export const taskLogStatus = [
  { label: '完成', value: true },
  { label: '未完成', value: false },
]

// 定时任务完成状态
export const foodCouponUserStatus = [
  { label: '未使用', value: 1 },
  { label: '已使用', value: 2 },
  { label: '已停用', value: 3 },
]

// 赠送帐户消费规则
export const giftRules = [
  { label: '优先使用赠送金额', value: 1 },
  { label: '优先使用本金', value: 2 },
  { label: '赠送金额和本金按比例使用', value: 3 },
]

// 轮播图启用状态
export const advertStatus = [
  { label: '开启', value: true },
  { label: '关闭', value: false },
]

// 星期选项
export const weeks = [
  { label: '星期一', value: 1 },
  { label: '星期二', value: 2 },
  { label: '星期三', value: 3 },
  { label: '星期四', value: 4 },
  { label: '星期五', value: 5 },
  { label: '星期六', value: 6 },
  { label: '星期日', value: 7 },
]

// 页面模板类型
export const designPageType = [
  { label: '扫码点餐小程序', value: 1 },
  { label: '零售商城小程序', value: 2 },
]

// 入库单审核状态
export const warehouseStatus = [
  { label: '未审核', value: false },
  { label: '已审核', value: true },
]
// 入库单审核状态
export const rejectionStatus = [
  { label: '未退货', value: 1 },
  { label: '部分退货', value: 2 },
  { label: '已退货', value: 3 },
]

// 入库单审核范围
export const stockSPlanScope = [
  { label: '单品盘点', value: 1 },
  { label: '全场盘点', value: 2 },
  // { label: "分类盘点", value: 2 },
  // { label: "品牌盘点", value: 4 },
  // { label: "供应商盘点", value: 5 }
]
// 入库单审核状态
export const stockSPlanStatus = [
  { label: '待盘点', value: 1 },
  { label: '盘点中', value: 2 },
  { label: '待审核', value: 3 },
  { label: '已完成', value: 4 },
]

// 盘点范围
export const stockRealSheetScope = [
  { label: '实时盘点', value: 1 },
  { label: '计划盘点', value: 2 },
]

// 库存单据类型
export const stockStatementType = [
  { label: '采购入库', value: 1 },
  { label: '入库单反审核', value: 2 },
  { label: '盘点', value: 3 },
  { label: '损溢', value: 4 },
  { label: '采购退货', value: 5 },
  { label: '退货单反审核', value: 6 },
  { label: '前台销售', value: 8 },
  { label: '领用', value: 9 },
  { label: '领用单反审核', value: 10 },
  { label: '报损', value: 11 },
  { label: '报损单反审核', value: 12 },
]

// 盘点结果状态
export const detailTypeNameType = [
  { label: '漏盘', value: 0 },
  { label: '盘平', value: 1 },
  { label: '盘赢', value: 2 },
  { label: '盘亏', value: 3 },
  { label: '全部', value: '' },
]

// 创建广告活动活动类型
export const linkTypeList = [
  { name: '普通展示图片', value: 0 },
  { name: '菜品详情', value: 1 },
  { name: '充值活动', value: 2 },
  { name: '充值活动详情', value: 3 },
]

export const activityTypeList = [
  // { label: "扫码领券", value: 1 },
  // { label: "储值赠券", value: 2 },
  // { label: "累计次数赠礼", value: 3 },
  { label: '消费满额赠礼', value: 4 },
  { label: '弹窗广告活动', value: 5 },
  { label: '商品推荐活动', value: 6 },
  { label: '加价换购活动', value: 7 },
]
export const statusList = [
  { label: '进行中', value: 1 },
  { label: '未开始', value: 2 },
  { label: '停止', value: 3 },
  { label: '已结束', value: 4 },
]
export const takeoutStatusList = [
  { label: '已异常', value: -1 },
  { label: '待接单', value: 0 },
  { label: '已接单', value: 1 },
]

export const commandList = [
  { name: '今天', key: 1 },
  { name: '本周', key: 2 },
  { name: '本月', key: 3 },
  { name: '本季', key: 4 },
  { name: '本年', key: 5 },
  { name: '昨天', key: 6 },
  { name: '上周', key: 7 },
  { name: '上月', key: 8 },
  { name: '上季', key: 9 },
  { name: '上年', key: 10 },
]
export const selectCountList = [
  { label: '数量不限', value: 1 },
  { label: '数量必选', value: 2 },
  { label: '范围', value: 3 },
]
export const collectTypeList = [
  { label: '明细合计', value: 1 },
  { label: '最高价明细', value: 2 },
]

// 入库单据类型
export const orderType2 = [
  { label: '入库单', value: 1 },
  { label: '盘盈单', value: 3 },
  { label: '损溢流水', value: 4 },
]

// 出库单据类型
export const checkoutTypeList = [
  { label: '退货单', value: 5 },
  { label: '盘亏单', value: 3 },
  { label: '损溢流水', value: 4 },
  { label: '领用单', value: 9 },
  { label: '报损单', value: 11 },
]

export const summaryList = [
  { label: '入库商品明细表', value: 0 },
  { label: '入库商品汇总表', value: 1 },
]
export const checkoutSummaryList = [
  { label: '出库商品明细表', value: 0 },
  { label: '出库商品汇总表', value: 1 },
]

export const userDiscountTypes = [
  { label: '销售价', value: 2 },
  { label: '会员价', value: 1 },
  { label: '会员等级价', value: 3 },
  { label: '折扣卡', value: 0 },
]

export const showPositionTypeList = [
  { label: '首页', value: 1 },
  { label: '点餐页', value: 2 },
  { label: '个人页', value: 3 },
]

export const stockWarnType = [
  { label: '全部', value: 0 },
  { label: '超上限', value: 1 },
  { label: '超下限', value: 2 },
]

export const procureType: { label: string; value: number; columns: ColumnProps<any>[]; api: (params: any) => Promise<any> }[] = [
  { label: '采购收货明细', value: 0, columns: warehouseTotalColumns, api: getProcureWarehouseTotalAPI },
  { label: '采购退货明细', value: 1, columns: rejectionTotalColumns, api: getProcureWarehouseTotalAPI },
  { label: '采购商品汇总', value: 2, columns: goodsTotalColumns, api: getProcureWarehouseTotalAPI },
  { label: '采购供应商汇总', value: 3, columns: supplierTotalColumns, api: getProcureWarehouseTotalAPI },
  { label: '采购类别汇总', value: 4, columns: procureTypeTotalColumns, api: getProcureWarehouseTotalAPI },
  // { label: '采购门店汇总', value: 5 },
  // { label: '供应商门店汇总', value: 6 },
  { label: '供应商商品汇总', value: 5, columns: supplierGoodsTotalColumns, api: getProcureWarehouseTotalAPI },
  { label: '供应商类别汇总', value: 6, columns: supplierTypeTotalColumns, api: getProcureWarehouseTotalAPI },
]

export const dateList = [
  { label: '每天', value: 1 },
  { label: '每周', value: 2 },
  { label: '每月', value: 3 },
]
export const storeList = [
  { label: '全部门店', value: 0 },
  { label: '指定门店', value: 1 },
]
export const onlyVipList = [
  { label: '全部', value: 0 },
  { label: '仅会员', value: 2 },
]
export const goodsType = [
  { label: '无', value: 0 },
  { label: '制定分类', value: 1 },
  { label: '指定商品', value: 1 },
]
export const weekList = [
  { label: '周一', value: 1 },
  { label: '周二', value: 2 },
  { label: '周三', value: 3 },
  { label: '周四', value: 4 },
  { label: '周五', value: 5 },
  { label: '周六', value: 6 },
  { label: '周日', value: 7 },
]
